package com.ear.orange.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ear.orange.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @author orange
 */
@Mapper
@Repository
public interface UserMapper extends BaseMapper<User> {

    /**
     * 修改当前用户信息
     *
     * @param user 当前用户
     * @return 是否修改成功
     */
    Boolean editUserInfo(User user);

    /**
     * 通过Id查询当前登录用户信息
     *
     * @param id 用户id
     * @return 用户信息
     */
    User getUserInfoById(@Param("id") Long id);
}
